package com.xyy.saas.payment.service.impl;

import com.xyy.saas.payment.dao.mapper.UserInfoMapper;
import com.xyy.saas.payment.dao.model.UserInfo;
import com.xyy.saas.payment.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserInfoServiceImpl implements UserInfoService {

    @Autowired
    private UserInfoMapper userInfoMapper;

    @Override
    public int createUserInfo(UserInfo userInfo){
        return userInfoMapper.insertSelective(userInfo);
    }

    @Override
    public int updateUserInfoByUserId(UserInfo userInfo){
        return userInfoMapper.updateByAccountId(userInfo);

    }

    @Override
    public UserInfo queryUserInfoByAccountId(String accountId){
        return userInfoMapper.queryUserInfoByAccountId(accountId);
    }

    @Override
    public int updateByPrimaryKeySelective(UserInfo record) {
        return userInfoMapper.updateByPrimaryKeySelective(record);
    }
}
